From: Jonas Dreßler Date: Sun, 17 Nov 2024 18:01:23 +0000 (+0100) Subject: keyboard: Don't check for key.action using strict equality operator X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~185^2^2~4 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=defdd8784653bdf4147b0b9a45d9bf7cdc5367f2;p=gnome-shell.git keyboard: Don't check for key.action using strict equality operator A lot of keys have no action set. In that case key.action is `undefined`, but the strict equality check of `action !== null` here will return true and we'll enter the if-case anyway. That's quite confusing and was not intended like that, so change the comparison to a less-strict operator. Part-of: (cherry picked from commit 91ffc4c06bbb0e4c8a5df76642c8576b61fbde9e) --- diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js index 8bb5b0466..a42c6ca87 100644 --- a/js/ui/keyboard.js +++ b/js/ui/keyboard.js @@ -1513,7 +1513,7 @@ export const Keyboard = GObject.registerClass({ }); } - if (key.action !== null) { + if (key.action) { button.connect('released', () => { if (key.action === 'hide') { this.close(true);